package com.lantosec.hmrp.modules.system.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.core.mvc.BaseVO;
import com.lantosec.hmrp.modules.system.entity.SysSmsLog;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * <p>
 * 短信发送日志 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-04
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="SysSmsLog对象", description="短信发送日志")
public class SysSmsLogVO extends BaseVO<SysSmsLog> {
    private static final long serialVersionUID = 1L;


    public SysSmsLogVO(SysSmsLog entity){
        this.smsLogId = entity.getSmsLogId();
        this.moduleId = entity.getModuleId();
        this.smsPhone = entity.getSmsPhone();
        this.smsContent = entity.getSmsContent();
        this.smsCode = entity.getSmsCode();
        this.smsSendtime = entity.getSmsSendtime();
    }

    @Override
    public SysSmsLog convertToEntity(){
        return new SysSmsLog(this);
    }


    @ApiModelProperty(value = "短信发送日志ID")
    @TableId(value = "sms_log_id", type = IdType.AUTO)
    private Integer smsLogId;

    @ApiModelProperty(value = "功能模块ID")
    private String moduleId;

    @ApiModelProperty(value = "短信接收号码")
    private String smsPhone;

    @ApiModelProperty(value = "短信内容")
    private String smsContent;

    @ApiModelProperty(value = "短信平台返回代码")
    private String smsCode;

    @ApiModelProperty(value = "短信发送时间")
    private Date smsSendtime;

    @ApiModelProperty(value = "删除标识")
    @TableField(exist = false)
    private Integer flag;


}
